<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    价格：{{ num | currency }}
  </div>
  
  <script src="./vue.js"></script>
  <script>
    /* Vue.filter('currency', (v)=>{
      return "￥"+v
    }) */
    const vm = new Vue({
      el:"#app",
      data:{
        num: 100
      },
      filters: {
        currency(v){
          return '￥'+v
        }
      }
    })
  </script>
</body>
</html>
